package util.model;

import org.apache.flink.api.common.serialization.DeserializationSchema;
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.api.common.typeinfo.TypeHint;
import org.apache.flink.api.common.typeinfo.TypeInformation;

import java.io.IOException;

public class SimpleByteSchema implements DeserializationSchema<byte[]> {


	@Override
	public byte[] deserialize(byte[] message) throws IOException {
		return message;
	}

	@Override
	public boolean isEndOfStream(byte[] nextElement) {
		return false;
	}

	@Override
	public TypeInformation<byte[]> getProducedType() {
		return TypeInformation.of(new TypeHint<byte[]>(){});
	}
}